<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of medfilt1m</title>
  <meta name="keywords" content="medfilt1m">
  <meta name="description" content="One-dimensional adaptive median filtering with missing values.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<!-- menu.html filters -->
<h1>medfilt1m
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>One-dimensional adaptive median filtering with missing values.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function y = medfilt1m( x, r, z ) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> One-dimensional adaptive median filtering with missing values.

 Applies a width s=2*r+1 one-dimensional median filter to vector x, which
 may contain missing values (elements equal to z). If x contains no
 missing values, y(j) is set to the median of x(j-r:j+r). If x contains
 missing values, y(j) is set to the median of x(j-R:j+R), where R is the
 smallest radius such that sum(valid(x(j-R:j+R)))&gt;=s, i.e. the number of
 valid values in the window is at least s (a value x is valid x~=z). Note
 that the radius R is adaptive and can vary as a function of j.

 This function uses a modified version of medfilt1.m from Matlab's 'Signal
 Processing Toolbox'. Note that if x contains no missing values,
 medfilt1m(x) and medfilt1(x) are identical execpt at boundary regions.

 USAGE
  y = medfilt1m( x, r, [z] )

 INPUTS
  x      - [nx1] length n vector with possible missing entries
  r      - filter radius
  z      - [NaN] element that represents missing entries

 OUTPUTS
  y      - [nx1] filtered vector x

 EXAMPLE
  x=repmat((1:4)',1,5)'; x=x(:)'; x0=x;
  n=length(x); x(rand(n,1)&gt;.8)=NaN;
  y = medfilt1m(x,2); [x0; x; y; x0-y]

 See also <a href="modefilt1.html" class="code" title="function y = modefilt1( x, s )">MODEFILT1</a>, MEDFILT1

 Piotr's Computer Vision Matlab Toolbox      Version 2.35
 Copyright 2014 Piotr Dollar.  [pdollar-at-gmail.com]
 Licensed under the Simplified BSD License [see external/bsd.txt]</pre></div>





<!-- Start of Google Analytics Code -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4884268-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- end of Google Analytics Code -->

<hr><address>Generated by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2003</address>
</body>
</html>
